import layoutHeaderAside from '@/layout/header-aside'

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

const meta = {
  auth: true
}

export default {
  path: '/releasecourse',
  name: 'releasecourse',

  meta,
  redirect: {
    name: 'course'
  },
  component: layoutHeaderAside,
  children: [{
      path: '/course',
      name: 'course',
      component: _import('releasecourse/course'),
      meta: {
        ...meta,
        title: '课程发布'
      }
    },
    {
      path: '/gonggao',
      name: 'gonggao',
      component: _import('releasecourse/gonggao'),
      meta: {
        ...meta,
        title: '发布公告'
      }
    },
    {
      path: '/lunbo',
      name: 'lunbo',
      component: _import('releasecourse/lunbo'),

      meta: {
        ...meta,
        title: '发布轮播图'
      }
    },
    {
      path: '/adm_courseclass',
      name: 'adm_courseclass',
      component: _import('releasecourse/teCourseclass'),
      meta: {
        ...meta,
        title: '课程班信息'
      }
    },
    {
      path: '/table',
      name: 'demo-plugins-export-table',
      component: _import('releasecourse/table'),
      meta: {
        ...meta,
        title: '导出表格'
      }
    },
  ]
}
